package com.singleton;

public class lazylingleton {
	private static lazylingleton instance=null;
	private  lazylingleton(){
		System.out.println("懒汉式创建");
		
	}
	
	public static lazylingleton getinstance(){
		if(instance==null){
			instance=new lazylingleton();
			
		}else{
			System.out.println("已经有一个了");
		}
		
		return instance;
	}
	public void get(){
		System.out.println("我就是我");
	}
}
